<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Shipment_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-shipment_id" data-rule="required" data-source="sales_shipment/index" data-field="name" class="form-control selectpage" name="row[shipment_id]" type="text" value="{$row.shipment_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Invoice_number')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-invoice_number" class="form-control" name="row[invoice_number]" type="text" value="{$row.invoice_number|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Return_reason')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-return_reason" data-rule="required" class="form-control selectpicker" name="row[return_reason]">
                {foreach name="returnReasonList" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.return_reason"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Return_date')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-return_date" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[return_date]" type="text" value="{$row.return_date}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Refund_status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="refundStatusList" item="vo"}
            <label for="row[refund_status]-{$key}"><input id="row[refund_status]-{$key}" name="row[refund_status]" type="radio" value="{$key}" {in name="key" value="$row.refund_status"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Refund_amount')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-refund_amount" class="form-control" step="0.01" name="row[refund_amount]" type="number" value="{$row.refund_amount|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Currency')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-currency" class="form-control" name="row[currency]" type="text" value="{$row.currency|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Tax_rate')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-tax_rate" class="form-control tax-rate-input" name="row[tax_rate]" type="number" value="{$row.tax_rate|htmlentities}" min="0" max="100" step="1" onchange="calculateTaxAmount()">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Tax_amount')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-tax_amount" class="form-control tax-amount-input" type="number" value="{$row.tax_amount|htmlentities}" min="0" step="0.01" readonly>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Total_amount')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-total_amount" class="form-control price-input" type="number" value="{$row.total_amount|htmlentities}" min="0" step="0.01" readonly>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_inventory_updated')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-is_inventory_updated" class="form-control" name="row[is_inventory_updated]" type="number" value="{$row.is_inventory_updated|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Remarks')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-remarks" class="form-control " rows="5" name="row[remarks]" cols="50">{$row.remarks|htmlentities}</textarea>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Quantity')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-quantity" data-rule="required" class="form-control" name="row[quantity]" type="number" value="{$row.quantity|htmlentities}">
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Unit')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-unit" class="form-control selectpicker" name="row[unit]" data-rule="required" data-live-search="true">
                <option value="">请选择单位</option>
                <option value="支" {if isset($row.unit) && $row.unit == '支'}selected{/if}>支</option>
                <option value="平方米" {if isset($row.unit) && $row.unit == '平方米'}selected{/if}>平方米</option>
            </select>
        </div>
    </div>
</form>
